package com.baiyi.homeui.hshomeui.entity;

import android.text.TextUtils;

import com.baiyi.homeui.hshomeui.manage.MsgReceiverManager;

public class PcMem {

    /*"memory": {
        "load": 93, // 负载：使用率
                "used": 15007, // MB
                "total": 16384, // MB
                "temperature": 0,
                "speed": 1064 // MHz
    }*/
    private long total;
    private long used;

    private long load;

    private float temperature;

    private int speed;

    public float getTemperature() {
        if(!TextUtils.isEmpty(MsgReceiverManager.temp_unit)&&MsgReceiverManager.temp_unit.equals("Fahrenheit")){
            return (int) ((temperature *1.8) + 32);
        }
        return temperature;
    }

    public void setTemperature(float temperature) {
        this.temperature = temperature;
    }

    public int getSpeed() {
        return speed;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public long getUsed() {
        return used;
    }

    public void setUsed(long used) {
        this.used = used;
    }

    public long getLoad() {
        return load;
    }

    public void setLoad(long load) {
        this.load = load;
    }

    @Override
    public String toString() {
        return "PcMem{" +
                "total=" + total +
                ", used=" + used +
                ", load=" + load +
                ", temperature=" + temperature +
                ", speed=" + speed +
                '}';
    }
}
